package be.ipl.Diavolo.daoImpl;

import java.util.List;

import javax.ejb.Stateless;

import be.ipl.Diavolo.dao.ActionDao;
import be.ipl.Diavolo.domaine.Action;

@SuppressWarnings("serial")
@Stateless
public class ActionDaoImpl extends DaoImpl<Integer, Action> implements ActionDao {

	@Override
	public List<Action> listerActions(String nomPartie, int numeroTour) {
		String query = "SELECT a from Action a, Tour t, Partie p" +
        		"WHERE t.id = a.idTour" +
				"AND p.id = t.idPartie" +
        		"AND p.nom = ?1" +
        		"AND t.numero = ?2";
        return this.liste(query, nomPartie, numeroTour);
	}
}
